home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGMISC / FPCDOCS.LZH / MISCELL.DOC < prev    next >
Text File  |  1988-06-01  |  4KB  |  121 lines

  1. IX.   MISCELLANEOUS UTILITIES 
  2.  
  3.  
  4.  
  5.  
  6. 1.  REBUILDING THE SYSTEM  
  7.  
  8.  
  9.  
  10. If you need to change a parameter or function in the F-PC system,
  11. you will need to re-compile F-PC and/or KERNEL.  This is simply
  12. done with the provided batch files as follows: 
  13.  
  14.  
  15.           C> FMETA <enter>        re-compiles KERNEL.COM
  16.           C> INSTALL <enter>      re-extends to create F-PC.EXE
  17.  
  18.  
  19. Either of these may be performed from the keyboard while in DOS. 
  20. PMETA invokes F-PC, loads the metacompiler, and recompiles the
  21. kernel.  The resulting new kernel is stored back as KERNEL.COM.
  22. Utilities and applications are then compiled on the top of KERNEL
  23. by INSTALL to generate a new F-PC system.
  24.  
  25.  
  26.  
  27. 2.   TURNKEY 
  28.  
  29.  
  30.  
  31. The word TURNKEY and some associated words are included in the 
  32. file SAVESYS.SEQ.  TURNKEY is used as follows: 
  33.  
  34.           ' MYAPPL TURNKEY MYAPP.COM <enter> 
  35.  
  36. After completing an application compile, the word MYAPPL is 
  37. defined to be performed by the program name MYAPP.COM.  TUNRKEY 
  38. automatically sets up the proper memory managment to allocate 64k 
  39. for your program, but does not save the HEADS.  Minimum 
  40. initialization is performed.  A file specified on the command line 
  41. will be opened, and you can use BL WORD to pick up additional 
  42. parameters from the command line.  You will NOT of course be able 
  43. to interpret, since heads are not saved, and you applicaton will 
  44. need to handle all errors and return to DOS when the program 
  45. completes. 
  46.  
  47. Before attempting to build an application, you will need to make a 
  48. copy of F-PC.SEQ, for customization.  Many of the later files in
  49. F-PC.SEQ are utilities, and will not be needed in your application.
  50. Start by writing your program and compiling it on F-PC.EXE.  Work
  51. in this environment until you are sure your program works.  Now 
  52. insert your program filename into the copy of F-PC.SEQ you made,
  53. about half way down, and try to compile the copy of F-PC.SEQ.  If
  54. it compiles then you can move your application file lower, until 
  55. you have determined what utilities are needed by your application. 
  56. Strip out all files above your application file, and load the file 
  57. SAVESYS.SEQ.  Use TURNKEY as previously described to make an 
  58. executable .COM file. 
  59.  
  60.  
  61.  
  62. 3.   MACROS IN F-PC AND SED
  63.  
  64.  
  65.  
  66. A file called MACROS.SEQ is provided, which implements keyboard 
  67. macros in Forth, at the level of KEY.  These macros can therefore 
  68. be used in the editor also.  The macros are used as follows: (the 
  69. sequence "Alt-M" means hold down the "Alternate" key and press the 
  70. "M" key.) 
  71.  
  72.           Alt-M           start defining a macro. 
  73.           Alt-1           we are defining the Alt-1 macro. 
  74.  
  75. Enter any keys you want in the macro, up to 128 keys. 
  76.  
  77.           Alt-M           completes the definition of the Alt-1 
  78.                           macro. 
  79.  
  80. Any keys typeable on the keyboard except Alt-m, and Alt-1 to Alt-5 
  81. can be included within a macro. 
  82.  
  83. To execute a macro, simply type its key name: 
  84.  
  85.           Alt-1           executes the macro key sequence for 
  86.                           the Alt-1 key. 
  87.  
  88. Currently macros may be only 127 characters in length, although 
  89. this can be changed by modifying the MAXMAC constant and 
  90. recompiling the system. 
  91.  
  92.  
  93.  
  94. 4.   THOUGHTS ON BLOCK 
  95.  
  96.  
  97.  
  98. One last thought.  Although all references to block operations 
  99. have been removed from F-PC, that does not mean you cannot use
  100. block type disk operations in your programs.  Here is the 
  101. equivalent F-PC source for some simple block read and block write
  102. functions: 
  103.  
  104.           create blockbuf 1024 allot 
  105.  
  106.           : BLKREAD   ( n1 --- a1 ) 
  107.                       1024 um* seek 
  108.                       blockbuf dup 1024 shndl @ hread drop ; 
  109.  
  110.           : BLKWRITE  ( n1 --- ) 
  111.                       1024 um* seek 
  112.                       blockbuf 1024 shndl @ hwrite drop ; 
  113.  
  114. These definitions will read and write a block of data from the 
  115. current file.  While it is true that the above does not provide 
  116. anything like a complete Forth BLOCKs functionality, like no auto 
  117. write on update, and no virtual buffering, it does show how simple 
  118. it is to access random records in a block. 
  119.  
  120.  
  121.